package org.vectrics.recruiter.struts.admin.job;

import java.util.List;

import javax.servlet.jsp.JspException;

import org.vectrics.recruiter.RecruitServiceLocator;
import org.vectrics.recruiter.job.JobFunction;
import org.vectrics.recruiter.job.JobFunctionType;
import org.vectrics.struts.VectricsActionData;
import org.vectrics.struts.VectricsStrutsAction;

/**
 * @author pgoette Action que tiene la responsabilidad de mostrar la pagina para
 *         crear un nuevo Term
 */
public class AddJobFunctionAction extends VectricsStrutsAction {

	@Override
	protected String doExecute(VectricsActionData actionData)
			throws JspException {
		String forward = "success";
		JobFunctionForm form = (JobFunctionForm) actionData.getForm();
		JobFunction function = null;
		JobFunctionType jobFunctionType = null;
		form.setJobFunctionTypes(RecruitServiceLocator.getJobProvider()
					.findAllJobFunctionsType());
		if (actionData.wasButtonPressed("cancel")) {
			return forward;
		}

		return "success";
	}

}
